Optimal. Leaf size=119 \[ -\frac {(2-2 i) a^{3/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {2 (a+i a \tan (c+d x))^{3/2}}{3 d \tan ^{\frac {3}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3629, 3626,
3625, 211} \begin {gather*} -\frac {(2-2 i) a^{3/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 (a+i a \tan (c+d x))^{3/2}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3625
Rule 3626
Rule 3629
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^{3/2}}{\tan ^{\frac {5}{2}}(c+d x)} \, dx &=-\frac {2 (a+i a \tan (c+d x))^{3/2}}{3 d \tan ^{\frac {3}{2}}(c+d x)}+i \int \frac {(a+i a \tan (c+d x))^{3/2}}{\tan ^{\frac {3}{2}}(c+d x)} \, dx\\ &=-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {2 (a+i a \tan (c+d x))^{3/2}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-(2 a) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {2 (a+i a \tan (c+d x))^{3/2}}{3 d \tan ^{\frac {3}{2}}(c+d x)}+\frac {\left (4 i a^3\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac {(2-2 i) a^{3/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {2 (a+i a \tan (c+d x))^{3/2}}{3 d \tan ^{\frac {3}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.87, size = 160, normalized size = 1.34 \begin {gather*} -\frac {2 i \sqrt {2} a e^{-i (c+d x)} \sqrt {\frac {a e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \left (e^{i (c+d x)} \left (-3+5 e^{2 i (c+d x)}\right )-3 \left (-1+e^{2 i (c+d x)}\right )^{3/2} \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )\right )}{3 d \left (-1+e^{2 i (c+d x)}\right ) \sqrt {\tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 369 vs. \(2 (97 ) = 194\).
time = 0.17, size = 370, normalized size = 3.11
method | result | size |
derivativedivides | \(-\frac {\sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a \left (3 i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+12 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )-3 \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+16 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \tan \left (d x +c \right )+4 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\right )}{6 d \tan \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}}\) | \(370\) |
default | \(-\frac {\sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a \left (3 i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+12 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )-3 \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+16 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \tan \left (d x +c \right )+4 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\right )}{6 d \tan \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}}\) | \(370\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 1008 vs. \(2 (89) = 178\).
time = 0.73, size = 1008, normalized size = 8.47 \begin {gather*} \frac {2 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left ({\left (\left (3 i + 3\right ) \, a \cos \left (3 \, d x + 3 \, c\right ) - \left (i + 1\right ) \, a \cos \left (d x + c\right ) + \left (3 i - 3\right ) \, a \sin \left (3 \, d x + 3 \, c\right ) - \left (i - 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (\frac {3}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + {\left (\left (3 i - 3\right ) \, a \cos \left (3 \, d x + 3 \, c\right ) - \left (i - 1\right ) \, a \cos \left (d x + c\right ) - \left (3 i + 3\right ) \, a \sin \left (3 \, d x + 3 \, c\right ) + \left (i + 1\right ) \, a \sin \left (d x + c\right )\right )} \sin \left (\frac {3}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} \sqrt {a} + 3 \, {\left (2 \, {\left (-\left (i + 1\right ) \, a \cos \left (2 \, d x + 2 \, c\right )^{2} - \left (i + 1\right ) \, a \sin \left (2 \, d x + 2 \, c\right )^{2} + \left (2 i + 2\right ) \, a \cos \left (2 \, d x + 2 \, c\right ) - \left (i + 1\right ) \, a\right )} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - \cos \left (d x + c\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - \sin \left (d x + c\right )\right ) + {\left (-\left (i - 1\right ) \, a \cos \left (2 \, d x + 2 \, c\right )^{2} - \left (i - 1\right ) \, a \sin \left (2 \, d x + 2 \, c\right )^{2} + \left (2 i - 2\right ) \, a \cos \left (2 \, d x + 2 \, c\right ) - \left (i - 1\right ) \, a\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2}\right )} - 2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) \sin \left (d x + c\right ) + \cos \left (d x + c\right ) \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )}\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sqrt {a} + 4 \, {\left ({\left ({\left (-\left (i + 1\right ) \, a \cos \left (d x + c\right ) - \left (i - 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + {\left (-\left (i + 1\right ) \, a \cos \left (d x + c\right ) - \left (i - 1\right ) \, a \sin \left (d x + c\right )\right )} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left (\left (i + 1\right ) \, a \cos \left (d x + c\right ) + \left (i - 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right ) - \left (i + 1\right ) \, a \cos \left (d x + c\right ) - \left (i - 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + {\left ({\left (-\left (i - 1\right ) \, a \cos \left (d x + c\right ) + \left (i + 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + {\left (-\left (i - 1\right ) \, a \cos \left (d x + c\right ) + \left (i + 1\right ) \, a \sin \left (d x + c\right )\right )} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left (\left (i - 1\right ) \, a \cos \left (d x + c\right ) - \left (i + 1\right ) \, a \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right ) - \left (i - 1\right ) \, a \cos \left (d x + c\right ) + \left (i + 1\right ) \, a \sin \left (d x + c\right )\right )} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} \sqrt {a}}{3 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {5}{4}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 395 vs. \(2 (89) = 178\).
time = 0.36, size = 395, normalized size = 3.32 \begin {gather*} \frac {4 \, \sqrt {2} {\left (5 \, a e^{\left (5 i \, d x + 5 i \, c\right )} + 2 \, a e^{\left (3 i \, d x + 3 i \, c\right )} - 3 \, a e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - 3 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {8 i \, a^{3}}{d^{2}}} \log \left (\frac {{\left (2 \, \sqrt {2} {\left (a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + \sqrt {-\frac {8 i \, a^{3}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{2 \, a}\right ) + 3 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {8 i \, a^{3}}{d^{2}}} \log \left (\frac {{\left (2 \, \sqrt {2} {\left (a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - \sqrt {-\frac {8 i \, a^{3}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{2 \, a}\right )}{6 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}}}{\tan ^{\frac {5}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}{{\mathrm {tan}\left (c+d\,x\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________